def convertMillis(convert: int):
    seconds = int(convert / 1000)
    minute = seconds // 60
    second = seconds % 60
    hour = minute // 60
    minute = minute % 60

    print('Convert '+ str(convert) + ' is ' + str(hour) + ':' + str(minute) + ':' + str(second))


convertMillis(eval(input()))
